package ngat.oss.simulation;

import ngat.util.logging.*;

import java.util.*;
import java.text.*;

public class SimulationLogFormatter extends LogFormatter {

    /** Create a SimulationLogFormatter.*/
    public SimulationLogFormatter() {
	super();
    }
    
    /** Format a record.*/
    public String format(LogRecord record) {
	StringBuffer buffer = new StringBuffer();
	buffer.append(df.format(new Date(record.getTime()))+
		      record.getLoggerName()+" "+record.getSeqno()+" "+
		      " ["+record.getLevel()+"] ["+record.getCat()+"] "+
		      record.getClazz()+" : "+
		      record.getSource()+"."+
		      record.getMethod()+"():: "+
		      record.getMessage());
	
	//	2007-08-21 T 15:23:54.555 UTC TASK 4 [3] [INFO] OBSERVE : Task45.doStuff():: 


	return buffer.toString();
    }

    public String getHead() {
	return "";
    }
    
    public String getTail() {
	return "";
    }
  
    /** Return the file name extension for the formatter.*/
    public String getExtensionName() { return "txt"; }

}
